<?php
/**
 * Copyright (C) 2013  Artur Tolstenco
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {	
	protected function _initViewHelpers() {
		$this->bootstrap('layout');
		$layout = $this->getResource('layout');
		
		$view = $layout->getView();
		$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
		ZendX_JQuery::enableView($view);
		
// 		$view->jQuery()->enable();//enable jquery ; ->setCdnSsl(true) if need to load from ssl location
// 							->setVersion('1.5')//jQuery version, automatically 1.5 = 1.5.latest
// 							->setUiVersion('1.8')//jQuery UI version, automatically 1.8 = 1.8.latest
// 							->addStylesheet('https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/ui-lightness/jquery-ui.css')//add the css
// 							->uiEnable();//enable ui
	}
	
	/**
	 * Adds factories and  mappers as resource type, enabling it auto-loading
	 */
	protected function _initResourceLoader() {
		$this->_resourceLoader->addResourceType('mapper', 'models/Mapper', 'Mapper');
	}

}

